package com.qf.web;

import com.qf.bean.Role;
import com.qf.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 2019/11/20
 * Administrator
 * ssm1119
 * 面向对象面向君  不负代码不负卿
 */
@Controller
public class RoleController {

    @Autowired
    private RoleService roleService;
    //根据部门id查询角色列表
    @RequestMapping("/getroles")
    @ResponseBody
    public List<Role> getbydeptid(int did){
        List<Role> roles = roleService.findbyDeptid(did);
        return roles;
    }
}
